package com.chenhao.springcloud.chenhaodesignservice.pattern.creational.prototype;

import java.text.MessageFormat;

/**
 * Description:
 *
 * @author chenhao
 * @date 2020/12/21 16:57
 */
public class MailUtil {
    public static void sendMail(Mail mail){
        String outputContent="向{0}发送邮件，地址为{1}发件内容{2}";
        System.out.println(MessageFormat.format(outputContent,mail.getName(),mail.getEmilAddress(),mail.getContent()));
    }

    public static void saveOriginMailRecord(Mail mail){
        System.out.println("存储记录"+mail.getContent());
    }
}
